The visibility toggling happening on ::click() relied implicitly
on the popover animation, but breaks on disabled animations. The
recursion happening within gtk_toggle_button_set_active() (which
triggers ::clicked when changing state) makes this vfunc to run
again, inverting the visibility of the popover in result.
Fix this by explicitly checking about recursion, we want the
button to be toggled to the right state, but we don't want the
callback running again.
https://bugzilla.gnome.org/show_bug.cgi?id=752577
GtkArrowType arrow_type;
gboolean use_popover;
guint press_handled : 1;
+ guint in_click : 1;
};
enum
GtkMenuButtonPrivate *priv = menu_button->priv;
gboolean active;
+ if (priv->in_click)
+ return;
+
+ priv->in_click = TRUE;
+
if (priv->menu)
{
active = !gtk_widget_get_visible (priv->menu);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), active);
gtk_toggle_button_toggled (GTK_TOGGLE_BUTTON (button));
+ priv->in_click = FALSE;
}
static void